package cn.wolfcode.luowowo.article.domain;

import cn.wolfcode.luowowo.common.domain.BaseDomain;
import lombok.Getter;
import lombok.Setter;
import org.springframework.util.StringUtils;

import java.util.List;

/**
 * 主题住宿
 */
@Setter
@Getter
public class HotelTheme extends BaseDomain {
    private Long id;
    private String name;
    private String destIds;//当name为周末好去处的时候，destId为景点的id
    private List<Object> dests;
    public Long[] getDestIds(){
        Long[] arr =null;
        if(StringUtils.hasLength(destIds)){
            String[] ids = destIds.split(",");
            arr=new Long[ids.length];
            for (int i = 0;i<ids.length;i++){
                arr[i] = Long.parseLong(ids[i]);
            }
        }
        return arr;
    }
}
